package com.tianqi.common.enums;

import lombok.Data;

/**
 * @className: RiGanDYGuiRenEnum
 * @description: 日干对应贵人
 * @author: zp
 * @create: 2023-08-21 17:00
 **/

public enum RiGanDYGuiRenEnum {
    JIA_1("1","甲","丑","未"),
    YI_1("1","乙","子","申"),
    BING_1("1","丙","亥","酉"),
    DING_1("1","丁","亥","酉"),
    WU_1("1","戊","丑","未"),
    JI_1("1","己","子","申"),
    GENG_1("1","庚","丑","未"),
    XIN_1("1","辛","午","寅"),
    REN_1("1","壬","卯","巳"),
    GUI_1("1","癸","卯","巳"),


    JIA_2("2","甲","丑","未"),
    YI_2("2","乙","子","申"),
    BING_2("2","丙","亥","酉"),
    DING_2("2","丁","亥","酉"),
    WU_2("2","戊","丑","未"),
    JI_2("2","己","子","申"),
    GENG_2("2","庚","丑","未"),
    XIN_2("2","辛","午","寅"),
    REN_2("2","壬","巳","卯"),
    GUI_2("2","癸","巳","卯");

    //类型 1：壬笑蛇免藏 2：壬笑兔蛇藏
    private String type;
    //日干
    private String riGan;
    //昼贵
    private String zhouGui;
    //夜贵
    private String yeGui;

    RiGanDYGuiRenEnum(String type, String riGan, String zhouGui, String yeGui) {
        this.type = type;
        this.riGan = riGan;
        this.zhouGui = zhouGui;
        this.yeGui = yeGui;
    }

    public String getType() {
        return type;
    }

    public String getRiGan() {
        return riGan;
    }

    public String getZhouGui() {
        return zhouGui;
    }

    public String getYeGui() {
        return yeGui;
    }
    public static RiGanDYGuiRenEnum getValueByRiZhu(String type,String riGan) {
        RiGanDYGuiRenEnum[] riGanDYGuiRen = values();
        for (RiGanDYGuiRenEnum riGanDYGuiRens : riGanDYGuiRen) {
            if (riGanDYGuiRens.getType().equals(type)&&riGanDYGuiRens.getRiGan().equals(riGan)) {
                return riGanDYGuiRens;
            }
        }
        return null;
    }
}
